#!/bin/sh
#
#Script to run dlvhex reasoning in an infinitive loop
#
# 1332313696
cd /home/thang/Study/Projects/diaryreasoner/

i=0

echo "\n------ PRIMARY REASONING -------"

while true
do
	i=$(($i+1))
	echo $i
	date --rfc-3339=ns

	echo "\n------ buffering -------"
	java -jar /home/thang/Study/Projects/AutoDiaryServer/dist/AutoDiaryServer.jar buffer 1337828441 1338368158
	echo "\n------ reasoning simple act (should call complex act here as well)-------"
	dlv -silent sensoring simpleAct constraints location > result.txt
	echo "\n------ simple act ambiguous reasoning - when window is fully loaded"
	java -jar /home/thang/Study/Projects/AutoDiaryServer/dist/AutoDiaryServer.jar simpleActToWindow
	echo "\n------ reasoning complex act (don't need this one) -------"
	dlv -silent sensoring simpleAct importSimpleAct location complexAct
	echo "\n------ store complex act -------"

	date --rfc-3339=ns	
	echo "------ sleeping -------"
done

